<template>
  <div class="about">
    <h1>This is an about page--App01</h1>

    <button @click="getPropsData">点击我获取数据</button>
    <button @click="setPropsData">点击我设置数据</button>
  </div>
</template>
<script setup>
import { useStore } from "@/stores/dataInfo";
import { getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const store = useStore();
const getPropsData = () => {
  // console.log(store.author)
  proxy.parentActions
    ? console.log(
        proxy.parentActions.getGlobalState(),
        "**********************"
      )
    : console.log("我并不是qiankun进来的");
};
const setPropsData = () => {
  proxy.parentActions
    ? proxy.parentActions.setGlobalState({
        author: "小明",
      })
    : console.log("我并不是qiankun进来的");
};
</script>
<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}
</style>
